package zjh_20230313;

import java.util.ArrayList;
import java.util.List;

public class Person {
    private String name;
    private int age;
    private char gender;

    public Person(String name, int age, char gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public char getGender() {
        return gender;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "name='" + name + '\'' +
                ", age=" + age +
                ", gender=" + gender;
    }

    public class PersonTest {
        static List list = new ArrayList();

        public static void main(String[] args) {
            zjh_20230313.Person p = new zjh_20230313.Person("Lee1", 15, '女');
            list.add(p);
            zjh_20230313.Person person2 = new zjh_20230313.Person("Lee1", 15, '女');
            list.add(person2);
            zjh_20230313.Person person3 = new zjh_20230313.Person("Lee2", 15, '女');
            list.add(person3);
            zjh_20230313.Person person4 = new zjh_20230313.Person("Lee3", 15, '女');
            list.add(person4);
            zjh_20230313.Person person5 = new zjh_20230313.Person("Lee4", 15, '女');
            list.add(person5);
            System.out.println(list);

        }
    }
}
